import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/education/couser_center/textbook_list_entity.dart';

TextbookListEntity $TextbookListEntityFromJson(Map<String, dynamic> json) {
  final TextbookListEntity textbookListEntity = TextbookListEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    textbookListEntity.id = id;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    textbookListEntity.companyCode = companyCode;
  }
  final String? textbookName = jsonConvert.convert<String>(json['textbookName']);
  if (textbookName != null) {
    textbookListEntity.textbookName = textbookName;
  }
  final String? textbookId = jsonConvert.convert<String>(json['textbookId']);
  if (textbookId != null) {
    textbookListEntity.textbookId = textbookId;
  }
  final String? textbookKeywords = jsonConvert.convert<String>(json['textbookKeywords']);
  if (textbookKeywords != null) {
    textbookListEntity.textbookKeywords = textbookKeywords;
  }
  final String? textbookTypeDicId = jsonConvert.convert<String>(json['textbookTypeDicId']);
  if (textbookTypeDicId != null) {
    textbookListEntity.textbookTypeDicId = textbookTypeDicId;
  }
  final String? textbookLecturerId = jsonConvert.convert<String>(json['textbookLecturerId']);
  if (textbookLecturerId != null) {
    textbookListEntity.textbookLecturerId = textbookLecturerId;
  }
  final String? textbookLecturerName = jsonConvert.convert<String>(json['textbookLecturerName']);
  if (textbookLecturerName != null) {
    textbookListEntity.textbookLecturerName = textbookLecturerName;
  }
  final String? textbookForm = jsonConvert.convert<String>(json['textbookForm']);
  if (textbookForm != null) {
    textbookListEntity.textbookForm = textbookForm;
  }
  final String? textbookDateStart = jsonConvert.convert<String>(json['textbookDateStart']);
  if (textbookDateStart != null) {
    textbookListEntity.textbookDateStart = textbookDateStart;
  }
  final int? textbookApproAch = jsonConvert.convert<int>(json['textbookApproAch']);
  if (textbookApproAch != null) {
    textbookListEntity.textbookApproAch = textbookApproAch;
  }
  final String? textbookCrowd = jsonConvert.convert<String>(json['textbookCrowd']);
  if (textbookCrowd != null) {
    textbookListEntity.textbookCrowd = textbookCrowd;
  }
  final String? textbookOverview = jsonConvert.convert<String>(json['textbookOverview']);
  if (textbookOverview != null) {
    textbookListEntity.textbookOverview = textbookOverview;
  }
  final int? viewNumber = jsonConvert.convert<int>(json['viewNumber']);
  if (viewNumber != null) {
    textbookListEntity.viewNumber = viewNumber;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    textbookListEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    textbookListEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    textbookListEntity.createDate = createDate;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    textbookListEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    textbookListEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    textbookListEntity.updateDate = updateDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    textbookListEntity.deleted = deleted;
  }
  final String? textbookCover = jsonConvert.convert<String>(json['textbookCover']);
  if (textbookCover != null) {
    textbookListEntity.textbookCover = textbookCover;
  }
  final int? isDirectory = jsonConvert.convert<int>(json['isDirectory']);
  if (isDirectory != null) {
    textbookListEntity.isDirectory = isDirectory;
  }
  final int? isQuestion = jsonConvert.convert<int>(json['isQuestion']);
  if (isQuestion != null) {
    textbookListEntity.isQuestion = isQuestion;
  }
  return textbookListEntity;
}

Map<String, dynamic> $TextbookListEntityToJson(TextbookListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['companyCode'] = entity.companyCode;
  data['textbookName'] = entity.textbookName;
  data['textbookId'] = entity.textbookId;
  data['textbookKeywords'] = entity.textbookKeywords;
  data['textbookTypeDicId'] = entity.textbookTypeDicId;
  data['textbookLecturerId'] = entity.textbookLecturerId;
  data['textbookLecturerName'] = entity.textbookLecturerName;
  data['textbookForm'] = entity.textbookForm;
  data['textbookDateStart'] = entity.textbookDateStart;
  data['textbookApproAch'] = entity.textbookApproAch;
  data['textbookCrowd'] = entity.textbookCrowd;
  data['textbookOverview'] = entity.textbookOverview;
  data['viewNumber'] = entity.viewNumber;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['deleted'] = entity.deleted;
  data['textbookCover'] = entity.textbookCover;
  data['isDirectory'] = entity.isDirectory;
  data['isQuestion'] = entity.isQuestion;
  return data;
}

extension TextbookListEntityExtension on TextbookListEntity {
  TextbookListEntity copyWith({
    String? id,
    String? companyCode,
    String? textbookName,
    String? textbookId,
    String? textbookKeywords,
    String? textbookTypeDicId,
    String? textbookLecturerId,
    String? textbookLecturerName,
    String? textbookForm,
    String? textbookDateStart,
    int? textbookApproAch,
    String? textbookCrowd,
    String? textbookOverview,
    int? viewNumber,
    String? createBy,
    String? createById,
    String? createDate,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? deleted,
    String? textbookCover,
    int? isDirectory,
    int? isQuestion,
  }) {
    return TextbookListEntity()
      ..id = id ?? this.id
      ..companyCode = companyCode ?? this.companyCode
      ..textbookName = textbookName ?? this.textbookName
      ..textbookId = textbookId ?? this.textbookId
      ..textbookKeywords = textbookKeywords ?? this.textbookKeywords
      ..textbookTypeDicId = textbookTypeDicId ?? this.textbookTypeDicId
      ..textbookLecturerId = textbookLecturerId ?? this.textbookLecturerId
      ..textbookLecturerName = textbookLecturerName ?? this.textbookLecturerName
      ..textbookForm = textbookForm ?? this.textbookForm
      ..textbookDateStart = textbookDateStart ?? this.textbookDateStart
      ..textbookApproAch = textbookApproAch ?? this.textbookApproAch
      ..textbookCrowd = textbookCrowd ?? this.textbookCrowd
      ..textbookOverview = textbookOverview ?? this.textbookOverview
      ..viewNumber = viewNumber ?? this.viewNumber
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..deleted = deleted ?? this.deleted
      ..textbookCover = textbookCover ?? this.textbookCover
      ..isDirectory = isDirectory ?? this.isDirectory
      ..isQuestion = isQuestion ?? this.isQuestion;
  }
}
